package cn.adkii.base.demo.reflect;

/**
 * @author malingdi
 * @description 学生实体类
 * @date 2023/11/22 15:39
 */
public class Student {
    private String name;

    private Integer age;

    public  Integer sex;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public Student(String name, Integer age, Integer sex) {
        this.name = name;
        this.age = age;
        this.sex = sex;
    }

    private Student(String name, Integer age) {
        this.name = name;
        this.age = age;
    }

    public String sayHi(String name, Integer age){
        return "hi everyone, my name is " + name  + ", " + age + "year's old";
    }

    protected void modifyAge(Integer age){
        this.age = age;
    }

    private void havFun(String name){
        System.out.println("haveFun");
    }

    public Student() {
    }
}
